035-search-insert-position.py
problem: ---
problem:
If not, return the index where it would be if it were inserted in order.
You may assume no duplicates in the array.

Sample Test Cases:
Input: [1,3,5,6], 5
Output: 2
Input: [1,3,5,6], 2
Output: 1
Input: [1,3,5,6], 7
Output: 4
Input: [1,3,5,6], 0
Output: 0
---

-----------------------------------------------------------------------
bug_fixes: ---
bug_fixes:
Replace / with // on line 5.
Add a colon at the end of line 6.
Replace `star` with `start` on line 12.
---

-----------------------------------------------------------------------
bug_desc: ---
bug_desc:
On line 5, a float division occurs between (start+end) and 2. This might result in mid being a float value if (start+end) is not divisible by 2. This can be fixed by performing n integer division, i.e., mid = (start+end)//2.
On line 6, a colon is missing from the if-condition, causing it to not terminate. This is a syntactical bug that can be fixed by adding a colon at the end.
On line 12, an unknown variable called star is returned. This causes a runtime error. It seems to be a spelling mistake where `start` should be returned instead of `star`.
---

-----------------------------------------------------------------------
line_no: ---
line_no:
5
---

-----------------------------------------------------------------------
buggy_code: ---
buggy_code:
1. class Solution:
2.     def searchInsert(self, nums: List[int], target: int) -> int:
3.         start, end = 0, len(nums)-1
4.         while start <= end:
5.           mid = (start+end)/2
6.           if nums[mid] == target
7.             return mid
8.           elif nums[mid] < target:
9.             start = mid + 1
10.           else:
11.             end = mid - 1
12.         return star
13. 
---

-----------------------------------------------------------------------
correct_code: ---
correct_code:
1. class Solution:
2.     def searchInsert(self, nums: List[int], target: int) -> int:
3.         start, end = 0, len(nums) - 1
4.         while start <= end:
5.           mid = (start+end)//2
6.           if nums[mid] == target:
7.             return mid
8.           elif nums[mid] < target:
9.             start = mid + 1
10.           else:
11.             end = mid - 1
12.         return start
13. 
---

-----------------------------------------------------------------------
